package com.du.spring5.bean;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Arrays;
import java.util.List;
import java.util.Map;

/**
 * @author : DuJiabao
 * @Project : spring
 * @Time : 2021/4/10 0:11
 * @Desc :
 */
@Component
public class User2 {
  private Phone[] phones;
  private List<Phone> phoneList;
  private Map<String, Phone> phoneMap;

  public User2() {
  }

  public Phone[] getPhones() {
    return phones;
  }

  @Autowired
  public void setPhones(Phone[] phones) {
    this.phones = phones;
  }

  public List<Phone> getPhoneList() {
    return phoneList;
  }

  @Autowired
  public void setPhoneList(List<Phone> phoneList) {
    this.phoneList = phoneList;
  }

  public Map<String, Phone> getPhoneMap() {
    return phoneMap;
  }

  @Autowired
  public void setPhoneMap(Map<String, Phone> phoneMap) {
    this.phoneMap = phoneMap;
  }

  @Override
  public String toString() {
    return "User2{" +
            "phones=" + Arrays.toString(phones) +
            ", phoneList=" + phoneList +
            ", phoneMap=" + phoneMap +
            '}';
  }
}
